package com.wjh.kt_vod.controller;

import com.wjh.kt_vod.result.Result;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.LinkedHashMap;

@RestController
@RequestMapping("/admin/vod/user")
public class UserLoginController {

    @PostMapping("/login")
    public Result login(){
        HashMap<String, Object> map = new LinkedHashMap<>();
        map.put("token","admin-token");
        return Result.ok(map).code(20000);
    }

    @GetMapping("/info")
    public Result info(){
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        map.put("roles","admin");
        map.put("introduction","I am a super administrator");
        map.put("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        map.put("name","Super Admin");
        return Result.ok(map);
    }


}
